/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.interceptors;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import java.util.Map;
import java.util.logging.Logger;

/**
 *
 * @author 
 */
public class AuthenticateInterceptor implements Interceptor {

    private static final Logger LOG = Logger.getLogger(AuthenticateInterceptor.class.getName());

    public void destroy() {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    public void init() {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    public String intercept(ActionInvocation actionInvocation) throws Exception {



        LOG.info("\nEnter Authenticate intercept");

        System.out.println("\nEnter Authenticate intercept");

        Map<String, Object> map = actionInvocation.getInvocationContext().getSession();

        return actionInvocation.invoke();
    }
}